import { lStorage } from "@/utils/storage/index";

// Token 存储在 LocalStorage 中, 封装其操作
const TOKEN_CODE = "access_token";
const DURATION = 6 * 60 * 60;

export function getToken() {
  return lStorage.get(TOKEN_CODE);
}

export function setToken(token) {
  lStorage.set(TOKEN_CODE, token, DURATION);
}

export function removeToken() {
  lStorage.remove(TOKEN_CODE);
}
